import React from "react";
//note:事件总线，用于跨组件传值
export const MyContext = React.createContext(null)



// export const MyContext = createContext(null)
//父子间中使用
// import {MyContext} from '@/utils/index'
// < MyContext.Provider value = {{ params:'123', event:'事件'}}>
    //  子组件
// </MyContext.Provider >


// 子组件中使用或跨级组件
// import React,{useContext} from 'react'
// import {MyContext} from '@/utils/index'
// const {params,event} = useContext(MyContext)
